// 本文件是云计算器的一部分。

// 云计算器是自由软件：你可以再分发之和/或依照由自由软件基金会发布的 GNU 通用公共许可证修改之，无论是版本 3 许可证，还是（按你的决定）任何以后版都可以。

// 发布云计算器是希望它能有用，但是并无保障;甚至连可销售和符合某个特定的目的都不保证。请参看 GNU 通用公共许可证，了解详情。

// 你应该随程序获得一份 GNU 通用公共许可证的复本。如果没有，请看 <https://www.gnu.org/licenses/>.

// This file is part of WebCalculator.

// WebCalculator is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

// WebCalculator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along with WebCalculator. If not, see <https://www.gnu.org/licenses/>.
document.getElementById("goToHomePageButton").addEventListener("click", function() {
    window.location.href = "/calculator"; // 替换为你的目标URL
});

// 获取用于显示文件内容的<pre>元素
        var fileContent = document.getElementById("fileContent");

        // 发送Ajax请求获取文件内容
        var xhr = new XMLHttpRequest();
        xhr.open("GET", "/get_license", true);

        // 指定响应类型为文本
        xhr.responseType = "text";

        xhr.onload = function () {
            if (xhr.status === 200) {
                // 文件内容已成功加载
                var fileText = xhr.responseText;

                // 将文件内容显示在<pre>元素中
                fileContent.textContent = fileText;
            } else {
                // 处理错误
                fileContent.textContent = "无法加载文件内容。";
            }
        };

        // 发送请求
        xhr.send();